package com.xc.tjise.TJISE.day07;

public class ExceptionTest {
    public static void main(String[] args) {

        try {
//            System.out.println(1/0);
//            System.out.println("hello".charAt(5));
            System.out.println(new int[]{1,2,3}[-1]);
        String s=null;
            System.out.println(s.length());

        }




        catch (ArithmeticException arithmeticException){
            arithmeticException.printStackTrace();
        }
        catch (IndexOutOfBoundsException indexOutOfBoundsException){
            indexOutOfBoundsException.printStackTrace();
        }
        catch (NullPointerException nullPointerException) {
            nullPointerException.printStackTrace();
        }



        finally {
            System.out.println("finally.");
        }


        System.out.println("test");
    }
}
